package Proxy;

/**
 * @author duanzhizhou
 * @date 2024/9/27
 */
public class ProxyBot implements ChatBot{
    
    private final ChatBot chatBot;
    
    public ProxyBot(ChatBot chatBot) {
        this.chatBot = chatBot;
    }
    
    @Override
    public void sayHello() {
        System.out.println("我是代理");
        chatBot.sayHello();
    }
    
    @Override
    public void dance() {
        System.out.println("我是代理");
        chatBot.dance();
    }
}
